%h2 Complete Story Listing

- if @stories.empty?
  %h3 No Stories in Database
- else
  %table{'cellpadding'=>'0', 'cellspacing'=>'0'}
    %thead
      %tr
        %th Title
        %th Effort
        %th Description
        %th Product
        %th{'colspan' => '3'}
    %tbody
      - for story in @stories
        %tr{:class => cycle("alt_even", "alt_odd")}
          %td=h story.title
          %td=h story.effort
          %td=h story.description
          %td=h story.product_id
          %td= link_to 'View Story', product_story_path(@product, story)
          %td= link_to 'Edit', edit_product_story_path(@product, story)
          %td= link_to 'Delete', product_story_path(@product, story), :confirm => 'Are you sure?', :method => :delete

  = link_to 'Back to Products', products_path